package www.ld.com.domain.brand.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;
import www.ld.com.core.group.InsertGroup;
import www.ld.com.core.group.UpdateGroup;
import www.ld.com.dictionary.UseStatusEnum;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
@Accessors(chain = true)
@ToString
@EqualsAndHashCode
public class InBrandVO {
    @ApiModelProperty(value = "ID")
    @NotNull(message = "品牌ID不能为空",groups = UpdateGroup.class)
    private String id;
    @ApiModelProperty(value = "品牌名称")
    @NotBlank(message = "品牌名称不能为空")
    @Length(max = 20,min = 2,message = "品牌名称必须是{min}~{max}个字符",groups = {UpdateGroup.class, InsertGroup.class})
    private String name;
    @ApiModelProperty(value = "商标logo")
    @Length(max = 200, message = "商标logo不能大于{max}个字符",groups = InsertGroup.class)
    private String logo;
    @ApiModelProperty(value = "品牌介绍")
    private String description;
    @ApiModelProperty(value = "品牌状态")
    @NotNull(message = "品牌状态不能为空",groups = {UpdateGroup.class, InsertGroup.class})
    private UseStatusEnum status;
    @ApiModelProperty(value = "品牌排序")
    @Range( max = 100,message = "品牌排序不能大于{max}" ,groups = {UpdateGroup.class, InsertGroup.class} )
    private Integer sort;
}
